1. Field of the Invention
The present invention relates to an image correcting apparatus and method which can correct a scanned image distorted in a trapezoidal shape for a three-dimensional distortion correction made without causing a degraded image quality, a program for implementing the image correcting apparatus in a computer, a storage medium which has the program stored thereon, and an image reading apparatus and an image forming apparatus which incorporate the image correcting apparatus.
2. Description of the Related Art
A flat bed scanner typically reads flat sheet documents. Specifically, the flat bed scanner comprises a contact glass and a pivotable pressure plate disposed over the contact glass. After a document sheet is carried on the contact glass, the pressure plate is closed for scanning the document sheet. However, documents intended for scanning are not limited to such flat sheet ones, but certain pages in a book document can be subjected to scanning, in which case the book document is opened at intended pages that are placed on the contact glass for scanning.
However, as illustrated in FIG. 39, when a book 100 opened at certain pages is placed on a contact glass 102 for scanning, a binding margin 101 of the book document 100 cannot be brought into contact with the contact glass 102. When the binding margin 101 of the book document 100 rises above the contact glass 102, the binding margin 101 is away from a focal point of the scanner, so that the scanned image is distorted, shadowed, blurred, or otherwise deteriorated in the rising binding margin 101. The deteriorated image of the binding margin 101 is not readily readable and causes an extremely low recognition rate when characters on the image are recognized through an optical character reading (OCR) process. This is particularly true with a relatively thick book. In addition, when the operator presses the binding margin 101 of the book document 100 against the contact glass 102 to maintain the binding margin 101 on the focal plane, the book document 100 itself can be damaged.
To solve the foregoing problem, a method of correcting a distorted image involves estimating a three-dimensional shape of an object from information on the density on an image. A typical example of such a method of estimating a three-dimensional shape of an object from image density information is Shape from Shading, for example, as disclosed in T. Wada, H. Uchida and T. Matsuyama, “Shape from Shading with Interreflections under a Proximal Light Source: Distortion-free Copying of an Unfolded Book,” International Journal Computer Vision 24 (2), pp.125-135 (1997) (hereinafter called “Reference 1”).
However, the Shape from Shading method is not feasible because of a large amount of calculations and a long calculation time required for correcting distortions.
Laid-open Japanese Patent Application No. 5-161002 (hereinafter called “Reference 2”) in turn relies on triangulation to measure the shape of a book. However, the method described in Reference 2 is not proper because it requires a special shape measuring device for measuring the shape of a book in accordance with the triangulation.
In recent years, an image correcting apparatus has been proposed for estimating a three-dimensional shape of a book using the contour of the spread book in a read or scanned image to effectively correct distortions with a less amount of calculations (for example, see Laid-open Japanese Patent Application No. 11-41455).
When a book document is set on a contact glass, the book document must be placed with its image facing the contact glass, so that the operator can see only the cover of the book document. Since the operator cannot confirm how the book document is placed, a resulting scanned image a could diverge downwardly (hereinafter such a distortion is called the “divergent distortion”) because the binding margin of the book document rises above the contact glass by different amounts along its upper and lower edges, as illustrated in FIG. 40.
However, since conventional image correcting methods do not take into account the foregoing situation, they are not capable of sufficiently correcting the foregoing distortions in a scanned image, and moreover cause a lower image quality on the contrary.